<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let set = new Set([1, 2, 3, 4, 55, 66, 77, 'admin'])
    console.log(set);
    set.add(2)//set不能添加重复的值
    set.delete(2)
    set.add(2).add(8).add(0).delete(0)//链式操作
    set.has(2)
    for (let obj of set) {
      console.log(obj);
    }
    set.forEach(function (value) {
      console.log(value);
    })
  </script>
</body>

</html>